Optimal. Leaf size=70 \[ \frac {b \tanh ^{-1}\left (\frac {b-2 c x^2}{\sqrt {b^2-4 a c}}\right )}{2 a \sqrt {b^2-4 a c}}-\frac {\log \left (a-b x^2+c x^4\right )}{4 a}+\frac {\log (x)}{a} \]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 70, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.368, Rules used = {1114, 705, 29, 634, 618, 206, 628} \begin {gather*} \frac {b \tanh ^{-1}\left (\frac {b-2 c x^2}{\sqrt {b^2-4 a c}}\right )}{2 a \sqrt {b^2-4 a c}}-\frac {\log \left (a-b x^2+c x^4\right )}{4 a}+\frac {\log (x)}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 29
Rule 206
Rule 618
Rule 628
Rule 634
Rule 705
Rule 1114
Rubi steps
\begin {align*} \int \frac {1}{x \left (a-b x^2+c x^4\right )} \, dx &=\frac {1}{2} \operatorname {Subst}\left (\int \frac {1}{x \left (a-b x+c x^2\right )} \, dx,x,x^2\right )\\ &=\frac {\operatorname {Subst}\left (\int \frac {1}{x} \, dx,x,x^2\right )}{2 a}+\frac {\operatorname {Subst}\left (\int \frac {b-c x}{a-b x+c x^2} \, dx,x,x^2\right )}{2 a}\\ &=\frac {\log (x)}{a}-\frac {\operatorname {Subst}\left (\int \frac {-b+2 c x}{a-b x+c x^2} \, dx,x,x^2\right )}{4 a}+\frac {b \operatorname {Subst}\left (\int \frac {1}{a-b x+c x^2} \, dx,x,x^2\right )}{4 a}\\ &=\frac {\log (x)}{a}-\frac {\log \left (a-b x^2+c x^4\right )}{4 a}-\frac {b \operatorname {Subst}\left (\int \frac {1}{b^2-4 a c-x^2} \, dx,x,-b+2 c x^2\right )}{2 a}\\ &=\frac {b \tanh ^{-1}\left (\frac {b-2 c x^2}{\sqrt {b^2-4 a c}}\right )}{2 a \sqrt {b^2-4 a c}}+\frac {\log (x)}{a}-\frac {\log \left (a-b x^2+c x^4\right )}{4 a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.07, size = 117, normalized size = 1.67 \begin {gather*} \frac {\left (b-\sqrt {b^2-4 a c}\right ) \log \left (-\sqrt {b^2-4 a c}-b+2 c x^2\right )-\left (\sqrt {b^2-4 a c}+b\right ) \log \left (\sqrt {b^2-4 a c}-b+2 c x^2\right )+4 \log (x) \sqrt {b^2-4 a c}}{4 a \sqrt {b^2-4 a c}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{x \left (a-b x^2+c x^4\right )} \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.88, size = 230, normalized size = 3.29 \begin {gather*} \left [\frac {\sqrt {b^{2} - 4 \, a c} b \log \left (\frac {2 \, c^{2} x^{4} - 2 \, b c x^{2} + b^{2} - 2 \, a c - {\left (2 \, c x^{2} - b\right )} \sqrt {b^{2} - 4 \, a c}}{c x^{4} - b x^{2} + a}\right ) - {\left (b^{2} - 4 \, a c\right )} \log \left (c x^{4} - b x^{2} + a\right ) + 4 \, {\left (b^{2} - 4 \, a c\right )} \log \relax (x)}{4 \, {\left (a b^{2} - 4 \, a^{2} c\right )}}, -\frac {2 \, \sqrt {-b^{2} + 4 \, a c} b \arctan \left (-\frac {{\left (2 \, c x^{2} - b\right )} \sqrt {-b^{2} + 4 \, a c}}{b^{2} - 4 \, a c}\right ) + {\left (b^{2} - 4 \, a c\right )} \log \left (c x^{4} - b x^{2} + a\right ) - 4 \, {\left (b^{2} - 4 \, a c\right )} \log \relax (x)}{4 \, {\left (a b^{2} - 4 \, a^{2} c\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.57, size = 71, normalized size = 1.01 \begin {gather*} \frac {b \arctan \left (\frac {2 \, c x^{2} - b}{\sqrt {-b^{2} + 4 \, a c}}\right )}{2 \, \sqrt {-b^{2} + 4 \, a c} a} - \frac {\log \left (c x^{4} - b x^{2} + a\right )}{4 \, a} + \frac {\log \left (x^{2}\right )}{2 \, a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 69, normalized size = 0.99 \begin {gather*} \frac {b \arctan \left (\frac {2 c \,x^{2}-b}{\sqrt {4 a c -b^{2}}}\right )}{2 \sqrt {4 a c -b^{2}}\, a}+\frac {\ln \relax (x )}{a}-\frac {\ln \left (c \,x^{4}-b \,x^{2}+a \right )}{4 a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.89, size = 1015, normalized size = 14.50 \begin {gather*} \frac {\ln \relax (x)}{a}+\frac {\ln \left (c\,x^4-b\,x^2+a\right )\,\left (8\,a\,c-2\,b^2\right )}{2\,\left (4\,a\,b^2-16\,a^2\,c\right )}-\frac {b\,\mathrm {atan}\left (\frac {16\,a^3\,x^2\,\left (\frac {\left (3\,b^3-8\,a\,b\,c\right )\,\left (\frac {{\left (8\,a\,c-2\,b^2\right )}^2\,\left (10\,b\,c^3-\frac {\left (12\,b^3\,c^2-40\,a\,b\,c^3\right )\,\left (8\,a\,c-2\,b^2\right )}{2\,\left (4\,a\,b^2-16\,a^2\,c\right )}\right )}{4\,{\left (4\,a\,b^2-16\,a^2\,c\right )}^2}-\frac {b^2\,\left (10\,b\,c^3-\frac {\left (12\,b^3\,c^2-40\,a\,b\,c^3\right )\,\left (8\,a\,c-2\,b^2\right )}{2\,\left (4\,a\,b^2-16\,a^2\,c\right )}\right )}{16\,a^2\,\left (4\,a\,c-b^2\right )}+\frac {b^2\,\left (12\,b^3\,c^2-40\,a\,b\,c^3\right )\,\left (8\,a\,c-2\,b^2\right )}{16\,a^2\,\left (4\,a\,b^2-16\,a^2\,c\right )\,\left (4\,a\,c-b^2\right )}\right )}{8\,a^3\,c^2\,\left (25\,a\,c-6\,b^2\right )}-\frac {\left (10\,a^2\,c^2-14\,a\,b^2\,c+3\,b^4\right )\,\left (\frac {b^3\,\left (12\,b^3\,c^2-40\,a\,b\,c^3\right )}{64\,a^3\,{\left (4\,a\,c-b^2\right )}^{3/2}}-\frac {b\,\left (12\,b^3\,c^2-40\,a\,b\,c^3\right )\,{\left (8\,a\,c-2\,b^2\right )}^2}{16\,a\,{\left (4\,a\,b^2-16\,a^2\,c\right )}^2\,\sqrt {4\,a\,c-b^2}}+\frac {b\,\left (8\,a\,c-2\,b^2\right )\,\left (10\,b\,c^3-\frac {\left (12\,b^3\,c^2-40\,a\,b\,c^3\right )\,\left (8\,a\,c-2\,b^2\right )}{2\,\left (4\,a\,b^2-16\,a^2\,c\right )}\right )}{4\,a\,\left (4\,a\,b^2-16\,a^2\,c\right )\,\sqrt {4\,a\,c-b^2}}\right )}{8\,a^3\,c^2\,\sqrt {4\,a\,c-b^2}\,\left (25\,a\,c-6\,b^2\right )}\right )\,{\left (4\,a\,c-b^2\right )}^{3/2}}{b^2\,c^2}-\frac {2\,\left (3\,b^3-8\,a\,b\,c\right )\,{\left (4\,a\,c-b^2\right )}^{3/2}\,\left (\frac {{\left (8\,a\,c-2\,b^2\right )}^2\,\left (4\,b^2\,c^2-\frac {2\,a\,b^2\,c^2\,\left (8\,a\,c-2\,b^2\right )}{4\,a\,b^2-16\,a^2\,c}\right )}{4\,{\left (4\,a\,b^2-16\,a^2\,c\right )}^2}-\frac {b^2\,\left (4\,b^2\,c^2-\frac {2\,a\,b^2\,c^2\,\left (8\,a\,c-2\,b^2\right )}{4\,a\,b^2-16\,a^2\,c}\right )}{16\,a^2\,\left (4\,a\,c-b^2\right )}+\frac {b^4\,c^2\,\left (8\,a\,c-2\,b^2\right )}{4\,a\,\left (4\,a\,b^2-16\,a^2\,c\right )\,\left (4\,a\,c-b^2\right )}\right )}{b^2\,c^4\,\left (25\,a\,c-6\,b^2\right )}+\frac {2\,\left (4\,a\,c-b^2\right )\,\left (10\,a^2\,c^2-14\,a\,b^2\,c+3\,b^4\right )\,\left (\frac {b^5\,c^2}{16\,a^2\,{\left (4\,a\,c-b^2\right )}^{3/2}}-\frac {b^3\,c^2\,{\left (8\,a\,c-2\,b^2\right )}^2}{4\,{\left (4\,a\,b^2-16\,a^2\,c\right )}^2\,\sqrt {4\,a\,c-b^2}}+\frac {b\,\left (8\,a\,c-2\,b^2\right )\,\left (4\,b^2\,c^2-\frac {2\,a\,b^2\,c^2\,\left (8\,a\,c-2\,b^2\right )}{4\,a\,b^2-16\,a^2\,c}\right )}{4\,a\,\left (4\,a\,b^2-16\,a^2\,c\right )\,\sqrt {4\,a\,c-b^2}}\right )}{b^2\,c^4\,\left (25\,a\,c-6\,b^2\right )}\right )}{2\,a\,\sqrt {4\,a\,c-b^2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 5.74, size = 253, normalized size = 3.61 \begin {gather*} \left (- \frac {b \sqrt {- 4 a c + b^{2}}}{4 a \left (4 a c - b^{2}\right )} - \frac {1}{4 a}\right ) \log {\left (x^{2} + \frac {8 a^{2} c \left (- \frac {b \sqrt {- 4 a c + b^{2}}}{4 a \left (4 a c - b^{2}\right )} - \frac {1}{4 a}\right ) - 2 a b^{2} \left (- \frac {b \sqrt {- 4 a c + b^{2}}}{4 a \left (4 a c - b^{2}\right )} - \frac {1}{4 a}\right ) + 2 a c - b^{2}}{b c} \right )} + \left (\frac {b \sqrt {- 4 a c + b^{2}}}{4 a \left (4 a c - b^{2}\right )} - \frac {1}{4 a}\right ) \log {\left (x^{2} + \frac {8 a^{2} c \left (\frac {b \sqrt {- 4 a c + b^{2}}}{4 a \left (4 a c - b^{2}\right )} - \frac {1}{4 a}\right ) - 2 a b^{2} \left (\frac {b \sqrt {- 4 a c + b^{2}}}{4 a \left (4 a c - b^{2}\right )} - \frac {1}{4 a}\right ) + 2 a c - b^{2}}{b c} \right )} + \frac {\log {\relax (x )}}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________